package designmodel.oberver;

public class ObserverDemo implements Observer {

	public void update(Observable o, Object values) {
		if(values instanceof String){
			System.out.println("被观察者的名字变更为"+values);
		}
		if(values instanceof Integer){
			System.out.println("被观察者的年龄变更为"+values);
		}

	}

}
